﻿cmake_minimum_required(VERSION 3.4)

set(TARGET Ch06_Shapes)
project(${TARGET})

add_executable(${TARGET}
    ShapesDemo.cpp
)

add_custom_command(TARGET ${TARGET} POST_BUILD
#    COMMAND ${CMAKE_COMMAND} -E copy_directory
#        ${CMAKE_CURRENT_SOURCE_DIR}/FX
#        ${CMAKE_CURRENT_BINARY_DIR}/FX
    COMMAND ${CMAKE_COMMAND} -E make_directory
        ${CMAKE_CURRENT_BINARY_DIR}/FX
#fxc /Fc /Od /Zi /T fx_5_0 /Fo "%(RelativeDir)\%(Filename).fxo" "%(FullPath)"
    COMMAND fxc $<$<CONFIG:Debug>:/Fc> $<$<CONFIG:Debug>:/Od> $<$<CONFIG:Debug>:/Zi> /T fx_5_0 /Fo "${CMAKE_CURRENT_BINARY_DIR}/FX/color.fxo" "${CMAKE_CURRENT_SOURCE_DIR}/FX/color.fx"
    #COMMAND fxc $<$<CONFIG:Debug>:/Fc /Od /Zi>/T fx_5_0 /Fo "${CMAKE_CURRENT_BINARY_DIR}/FX/color.fxo" "${CMAKE_CURRENT_SOURCE_DIR}/FX/color.fx"
#fxc /T fx_5_0 /Fo "%(RelativeDir)\%(Filename).fxo" "%(FullPath)"
)
